package gbench.appdemo.myworld.economy.society;

import java.util.LinkedList;
import java.util.List;
import java.util.function.Consumer;

import lombok.Data;

/**
 * 社区人口
 * @author gbench
 *
 */
@Data
public class CommunityPoupluation {
    
    /**
     * 
     * @param individual
     */
    public void addIndividual(Individual individual) {
        individuals.add(individual);
    }
    
    /**
     * 
     * @param cs
     */
    public void forEach(Consumer<Individual> cs) {
        this.individuals.forEach(cs);
    }
    
    
    private String name;
    private List<Individual> individuals = new LinkedList<>();
}
